<div class="armazenamento">
<% fields_for "transporte[armazenamento_attributes][]", armazenamento do |transporte_armazenamento| %>	
	<table width="100%" height="100%">
		<tbody>
			<tr>
				<td width="20%">
					<div class="coluna-1" style="margin-left:none;">
						<p>
							<%= transporte_armazenamento.label :deposito_id, "Deposito:" %> <br/>
							<%= transporte_armazenamento.collection_select(:deposito_id, Deposito.all, :id, :nome, 
							options = {:prompt => "Selecione..."}, 
							:class => 'comboBox', 
							:index => nil, 
							:onChange => "new Ajax.Updater('updater_box', '/transportes/carregabox/' + this[this.selectedIndex].value,{asynchronous:true, evalScripts:true})") %>
						  <span id="spinner" style="display: none; border=0">
							<img style="border:0" class="center" src='../../images/active_scaffold/default/indicator-small.gif'>
						  </span>							
						</p>
					</div>					
				</td>
				<td width="5%"></td>
				<td width="20%">
					<div class="coluna-1" style="margin-left:none;">
						<p>
							<%= transporte_armazenamento.label :box, "Box:" %> <br/>
							<span id="updater_box">(Escolha um Deposito)</span>						
						</p>
					</div>										
				</td>
				<td width="5%"></td>
				<td width="20%">
					<div class="coluna-1" style="margin-left:none;">
						<p>
							<%= transporte_armazenamento.label :pares, "Pares:" %> <br/>
							<%= transporte_armazenamento.text_field :pares, {:class => "input-text-layout" , :index => nil}%> <br/>						
						</p>
					</div>									
				</td>
				<td width="5%"></td>				
				<td width="20%">
					<div class="coluna-1" style="margin-left:none;">
						<p>
							<%= transporte_armazenamento.label :cxs, "Cxs:" %> <br/>
							<%= transporte_armazenamento.text_field :cxs, {:class => "input-text-layout" , :index => nil} %>
						</p>
					</div>							
				</td>				
				<td width="5%">
					<% if armazenamento.new_record? %>
						<%= link_to_function image_tag("/images/cross.png", :border => 0, :id =>"armazenamento_cross"), "$(this).up('.armazenamento').remove()"%>							
					<% else %>
						<%= link_to_function image_tag("/images/cross.png", :border => 0, :id =>"armazenamento_cross"), "mark_for_destroy(this)"%>							
						<%= transporte_armazenamento.hidden_field :id, :index => nil%>
						<%= transporte_armazenamento.hidden_field :should_destroy, :index => nil, :class => 'should_destroy'%>
					<% end %>
				</td>			
			</tr>
		</tbody>
	</table>
<% end %>
</div>